﻿define(["plugins/router", "durandal/app"], function(router, app) {
  var routes = [
    { route: "", title: "Welcome", moduleId: "viewmodels/welcome", nav: true }
  ];
  return {
    router: router,
    search: function() {
      //It's really easy to show a message box.
      //You can add custom options too. Also, it returns a promise for the user's response.
      app.showMessage("Search not yet implemented...");
    },
    activate: function() {
      router.map(routes).buildNavigationModel();
      router.mapUnknownRoutes("viewmodels/error", "not-found");
      return router.activate();
    }
  };
});
